package org.mech.sefer.client.ui.component.console;

import org.apache.pivot.wtk.Component;
import org.apache.pivot.wtk.FillPane;
import org.apache.pivot.wtk.Frame;
import org.apache.pivot.wtk.Label;
import org.apache.pivot.wtk.Window;
import org.mech.sefer.client.mvp.wtk.ComponentViewImpl;

@org.springframework.stereotype.Component("consoleView")
public class ConsoleView extends ComponentViewImpl implements ConsolePresenter.View{
	
	private Frame window;
	private Label label;
	
	public ConsoleView() {
		window = new Frame();
		window.setMaximized(true);
		FillPane fillPane = new FillPane();
		label= new Label("test");
		fillPane.add(label);
		window.add(fillPane);
	}

	@Override
	public Component asComponent() {
		return window;
	}

	@Override
	public void setVisible(boolean showOrHide, Window owner) {
		window.setVisible(showOrHide);
		window.open(owner.getDisplay());
	}

}
